package com.woohua.demo.service;

import com.woohua.demo.strategy.dealer.DemoAbstractStrategy;
import com.woohua.demo.strategy.DemoStrategyHolder;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author wooHua
 * @date 2022/6/17 9:51
 * @description
 */
@Service
public class DemoService {

    public String hello() {
        List<DemoAbstractStrategy> eventTypeDealer = DemoStrategyHolder.getEventTypeDealer();
        eventTypeDealer.forEach(e -> {
            e.say();
            e.childSay();
        });
        return "hello strategy";
    }
}
